package com.ctrip.ec.api.mobile.common;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Created by cannon on 2018/3/26.
 */
public class ResultBody<T> {


    public  String code;
    public  String msg;
    public  T data;
    public  PagerInfo pager ;

    @JsonCreator
    public ResultBody(@JsonProperty("code") String code,
                      @JsonProperty("msg") String msg,
                      @JsonProperty("data") T data) {
        this.code = code;
        this.msg = msg;
        this.data = data;


    }

    public ResultBody(@JsonProperty("status") String code,
                      @JsonProperty("message") String msg,
                      @JsonProperty("res") T data,
                      @JsonProperty("pager") PagerInfo pager) {
        this(code,msg,data);

        this.pager = pager;
    }


}